Update to rust 2015-03-30
authorAlex Crichton <alex@alexcrichton.com>
Mon, 30 Mar 2015 19:30:50 +0000 (12:30 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 30 Mar 2015 19:30:50 +0000 (12:30 -0700)
Cargo.lock
Cargo.toml
src/cargo/core/resolver/mod.rs
src/cargo/lib.rs
src/cargo/util/toml.rs
src/rustversion.txt
tests/test_cargo_bench.rs
tests/test_cargo_compile_path_deps.rs
tests/test_cargo_compile_plugins.rs
tests/test_cargo_test.rs

index 21e921a0cecf9c90ff3590bc4432804ac34a7945..fe19cc4e7aa9c97e56bde21c23b3ddce9066d7b9 100644 (file)
@@ -2,38 +2,38 @@
 name = "cargo"
 version = "0.1.0"
 dependencies = [
- "advapi32-sys 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "curl 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "docopt 0.6.54 (registry+https://github.com/rust-lang/crates.io-index)",
+ "advapi32-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "docopt 0.6.55 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "flate2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "git2 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "git2-curl 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "glob 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git)",
- "kernel32-sys 0.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "kernel32-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
  "registry 0.1.0",
- "rustc-serialize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "semver 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
  "tar 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "tempdir 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "term 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "threadpool 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "time 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "threadpool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "time 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "toml 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.2.28 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "advapi32-sys"
-version = "0.0.4"
+version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "winapi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -43,12 +43,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "curl"
-version = "0.2.4"
+version = "0.2.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "curl-sys 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.2.28 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -57,20 +57,20 @@ name = "curl-sys"
 version = "0.1.17"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "libz-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "docopt"
-version = "0.6.54"
+version = "0.6.55"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -78,8 +78,8 @@ name = "env_logger"
 version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "log 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -87,7 +87,7 @@ name = "flate2"
 version = "0.2.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "miniz-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -102,7 +102,7 @@ version = "0.2.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "libgit2-sys 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.2.28 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -112,9 +112,9 @@ name = "git2-curl"
 version = "0.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "curl 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "git2 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.2.28 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -126,19 +126,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 [[package]]
 name = "hamcrest"
 version = "0.1.0"
-source = "git+https://github.com/carllerche/hamcrest-rust.git#2dbf32e738935f7ebb5223b31b8fc1fe6327adf8"
+source = "git+https://github.com/carllerche/hamcrest-rust.git#80e7a1cbd6db9ec20bb1d61920e55a1af91a9eb2"
 
 [[package]]
 name = "kernel32-sys"
-version = "0.0.11"
+version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "winapi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "libc"
-version = "0.1.3"
+version = "0.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -146,10 +146,10 @@ name = "libgit2-sys"
 version = "0.2.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "libssh2-sys 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "libz-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -166,9 +166,9 @@ name = "libssh2-sys"
 version = "0.1.15"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "libz-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -182,10 +182,10 @@ dependencies = [
 
 [[package]]
 name = "log"
-version = "0.3.0"
+version = "0.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -199,16 +199,16 @@ version = "0.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gcc 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "openssl-sys"
-version = "0.5.2"
+version = "0.5.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gcc 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "libressl-pnacl-sys 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -228,26 +228,26 @@ name = "rand"
 version = "0.3.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "regex"
-version = "0.1.21"
+version = "0.1.24"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "registry"
 version = "0.1.0"
 dependencies = [
- "curl 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "rustc-serialize"
-version = "0.3.7"
+version = "0.3.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -273,22 +273,22 @@ name = "term"
 version = "0.2.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "kernel32-sys 0.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "kernel32-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "threadpool"
-version = "0.1.1"
+version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "time"
-version = "0.1.21"
+version = "0.1.22"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gcc 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -296,7 +296,7 @@ name = "toml"
 version = "0.1.19"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "rustc-serialize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -305,14 +305,14 @@ version = "0.2.28"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "winapi"
-version = "0.1.15"
+version = "0.1.16"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
index 360ce18c5c6d81755fb214d171b95e6e2d0ceebd..6f8cac34256e637816124e00954c0423d47bc747 100644 (file)
@@ -31,9 +31,9 @@ libc = "0.1.2"
 registry = { path = "src/registry" }
 
 [target.i686-pc-windows-gnu]
-dependencies = { winapi = "0.1", advapi32-sys = "*", kernel32-sys = "*" }
+dependencies = { winapi = "0.1", advapi32-sys = "0.1", kernel32-sys = "0.1" }
 [target.x86_64-pc-windows-gnu]
-dependencies = { winapi = "0.1", advapi32-sys = "*", kernel32-sys = "*" }
+dependencies = { winapi = "0.1", advapi32-sys = "0.1", kernel32-sys = "0.1" }
 
 [dev-dependencies]
 tempdir = "0.3"
index ff1f0a01f223d3afae89d0b84a05eed9f0bdcbf2..39bd9a321859ef45cfa4d5e7edb5375912c56ff9 100644 (file)
@@ -185,7 +185,7 @@ fn activate(mut cx: Box<Context>,
         let mut candidates = try!(registry.query(dep));
         // When we attempt versions for a package, we'll want to start at the
         // maximum version and work our way down.
-        candidates.as_mut_slice().sort_by(|a, b| {
+        candidates.sort_by(|a, b| {
             b.version().cmp(a.version())
         });
         let candidates = candidates.into_iter().map(Rc::new).collect::<Vec<_>>();
@@ -196,7 +196,7 @@ fn activate(mut cx: Box<Context>,
     // before recursing on dependencies with more candidates. This way if the
     // dependency with only one candidate can't be resolved we don't have to do
     // a bunch of work before we figure that out.
-    deps.as_mut_slice().sort_by(|&(_, ref a, _), &(_, ref b, _)| {
+    deps.sort_by(|&(_, ref a, _), &(_, ref b, _)| {
         a.len().cmp(&b.len())
     });
 
@@ -220,9 +220,7 @@ fn flag_activated(cx: &mut Context,
                   method: &Method) -> bool {
     let id = summary.package_id();
     let key = (id.name().to_string(), id.source_id().clone());
-    let prev = cx.activations.entry(key).get().unwrap_or_else(|e| {
-        e.insert(Vec::new())
-    });
+    let prev = cx.activations.entry(key).or_insert(Vec::new());
     if !prev.iter().any(|c| c == summary) {
         cx.resolve.graph.add(id.clone(), &[]);
         prev.push(summary.clone());
index bf57298fdd111a6db74bd78ee786087a9c3ca38e..ac232f2fb77ae282fb2ad9409caf84ce6de81a37 100644 (file)
@@ -1,5 +1,5 @@
 #![deny(unused)]
-#![feature(os, std_misc, core, path_relative_from)]
+#![feature(os, std_misc, core, path_relative_from, collections)]
 #![feature(io, str_words, exit_status, fs_time, convert)]
 #![cfg_attr(test, deny(warnings))]
 
index 9e3726c90cc6e1ff9209ac3917d68dc6360b01af..d41d87a15d7bc20a2c4e0df79161fc8080cf96cb 100644 (file)
@@ -764,22 +764,17 @@ fn normalize(libs: &[TomlLibTarget],
 
     let mut ret = Vec::new();
 
-    match (libs, bins) {
-        ([_, ..], [_, ..]) => {
-            lib_targets(&mut ret, libs, metadata);
-            bin_targets(&mut ret, bins,
-                        &mut |bin| Path::new("src").join("bin")
-                                       .join(&format!("{}.rs", bin.name)));
-        },
-        ([_, ..], []) => {
-            lib_targets(&mut ret, libs, metadata);
-        },
-        ([], [_, ..]) => {
-            bin_targets(&mut ret, bins,
-                        &mut |bin| Path::new("src")
-                                        .join(&format!("{}.rs", bin.name)));
-        },
-        ([], []) => ()
+    if libs.len() > 0 && bins.len() > 0 {
+        lib_targets(&mut ret, libs, metadata);
+        bin_targets(&mut ret, bins,
+                    &mut |bin| Path::new("src").join("bin")
+                                   .join(&format!("{}.rs", bin.name)));
+    } else if libs.len() > 0 && bins.len() == 0 {
+        lib_targets(&mut ret, libs, metadata);
+    } else if libs.len() == 0 && bins.len() > 0 {
+        bin_targets(&mut ret, bins,
+                    &mut |bin| Path::new("src")
+                                    .join(&format!("{}.rs", bin.name)));
     }
 
     if let Some(custom_build) = custom_build {
index ecc25693f46c895e9c50bd7d75c62097bdf0295d..09053248bb5c00da1e6ca66715a17166641d972b 100644 (file)
@@ -1 +1 @@
-2015-03-26
+2015-03-30
index 54de09ce944ab826d64907dbe37e3c5305299306..de82969ab1c5515682df736ef44f62357341b83b 100644 (file)
@@ -675,7 +675,7 @@ test!(bench_dylib {
         "#)
         .file("src/lib.rs", r#"
             #![feature(test)]
-            extern crate "bar" as the_bar;
+            extern crate bar as the_bar;
             extern crate test;
 
             pub fn bar() { the_bar::baz(); }
@@ -685,7 +685,7 @@ test!(bench_dylib {
         "#)
         .file("benches/bench.rs", r#"
             #![feature(test)]
-            extern crate "foo" as the_foo;
+            extern crate foo as the_foo;
             extern crate test;
 
             #[bench]
index 024699e53886375a417bd37209332013636341e3..c5288943067b811aa91533d1df006c27aa3d61b6 100644 (file)
@@ -669,7 +669,7 @@ test!(path_dep_build_cmd {
             }
         "#)
         .file("bar/src/bar.rs.in", r#"
-            pub fn gimme() -> int { 0 }
+            pub fn gimme() -> i32 { 0 }
         "#);
 
     p.build();
@@ -689,7 +689,7 @@ test!(path_dep_build_cmd {
     // Touching bar.rs.in should cause the `build` command to run again.
     {
         let file = fs::File::create(&p.root().join("bar/src/bar.rs.in"));
-        file.unwrap().write_all(br#"pub fn gimme() -> int { 1 }"#).unwrap();
+        file.unwrap().write_all(br#"pub fn gimme() -> i32 { 1 }"#).unwrap();
     }
 
     assert_that(p.cargo("build"),
index 938487a5a03859b8a064c2f84aca4bca2f53d66c..24931eb1b6c05b36c737a822e8396674d05867a1 100644 (file)
@@ -72,7 +72,7 @@ test!(plugin_to_the_max {
             name = "baz"
             crate_type = ["dylib"]
         "#)
-        .file("src/lib.rs", "pub fn baz() -> int { 1 }");
+        .file("src/lib.rs", "pub fn baz() -> i32 { 1 }");
     bar.build();
     baz.build();
 
index 401ca3ba5fe8498fe68ebe6968435ac72514c936..6cec47e39feba8a06679103afe3d42564acfe27f 100644 (file)
@@ -659,7 +659,7 @@ test!(test_dylib {
             path = "bar"
         "#)
         .file("src/lib.rs", r#"
-            extern crate "bar" as the_bar;
+            extern crate bar as the_bar;
 
             pub fn bar() { the_bar::baz(); }
 
@@ -667,7 +667,7 @@ test!(test_dylib {
             fn foo() { bar(); }
         "#)
         .file("tests/test.rs", r#"
-            extern crate "foo" as the_foo;
+            extern crate foo as the_foo;
 
             #[test]
             fn foo() { the_foo::bar(); }